internal implementation of hashmap